package br.unigranrio.facebook.controller;

import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Post;
import br.com.caelum.vraptor.Resource;
import br.unigranrio.facebook.modelo.Token;

@Resource
public class LoginController {

	private Token sessionToken;
	
	public LoginController(Token sessionToken) {
		this.sessionToken = sessionToken;
	}

	@Get
	@Path("/")
	public void login() {
	}	
	
	@Post
	@Path("/index")
	public void index(String token) {
			sessionToken.setToken(token);
	}
}
